﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HotelManager
{
    public abstract class Employee : Person
    {
        /// <summary>
        /// Walary received by the current employee
        /// </summary>
        public decimal Salary { get; set; }

        /// <summary>
        /// The discount in percent the current employeet hasin the hotel
        /// </summary>
        public decimal DiscountPercent { get; set; }

        public Employee(string firstName, string lastName, string address, string egn, string id, string phone, 
            string nationality, decimal salary, decimal discount)
            : base(firstName, lastName, address, egn, id, phone, nationality)
        {
            this.Salary = salary;
            this.DiscountPercent = discount;
        }

        public Employee()
        {

        }
        
        public override decimal Purchase(PurchaseInfo purchaseInfo)
        {
            return this.DiscountPercent / 100 * purchaseInfo.Price;
        }
    }
}
